package org.openfans.domain;

/**
 * 描述：tag之间关联的类，设计了权重<br>
 * 日期：2006-5-29<br>
 * 
 * @author 张俊<br>
 * @email:pesome@gmail.com<br>
 */
public class TagRelation {
	private int id;

	private Tag tag;

	private Tag rtag;

	int weight;

	public TagRelation() {
	}

	public TagRelation(Tag tag, Tag rtag, int weight) {
		super();
		this.rtag = rtag;
		this.tag = tag;
		this.weight = weight;
	}

	public Tag getRtag() {
		return rtag;
	}

	public void setRtag(Tag rtag) {
		this.rtag = rtag;
	}

	public Tag getTag() {
		return tag;
	}

	public void setTag(Tag tag) {
		this.tag = tag;
	}

	public int getWeight() {
		return weight;
	}

	public void setWeight(int weight) {
		this.weight = weight;
	}

	public TagRelation increaseWeight(int i) {
		weight = weight + i;
		return this;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

}
